package com.sky.service.impl;

import com.sky.domain.Document;
import com.sky.mapper.DocumentMapper;
import com.sky.service.DocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 尹稳健~
 * @version 1.0
 */
@Service
public class DocumentServiceImpl implements DocumentService {

    @Autowired
    private DocumentMapper documentMapper;

    @Override
    public List<Document> findAll(String title) {
        return documentMapper.findAll(title);
    }

    @Override
    public Document findDocumentById(Integer id) {
        return documentMapper.findDocumentById(id);
    }

    @Override
    public void update(Document document) {
        documentMapper.update(document);
    }

    @Override
    public void upload(Document document) {
        documentMapper.upload(document);
    }

    @Override
    public void delete(Integer id) {
        documentMapper.delete(id);
    }
}
